package com.wyh.domain.vo.gfive.treeVo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Api("用于生成树的楼层VO")
@TableName("layer")
public class LayerVO {
    @ApiModelProperty("主键")
    @TableId(type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("上级id")
    @NotNull(message = "楼层上级id不能为空")
    @TableField("parentid")
    private Integer parentId;

    @ApiModelProperty("楼层名称")
    @NotBlank(message = "楼层名称不能为空或空字符串")
    private String name;



    @ApiModelProperty("是否启用，1启用，0停用")
    @NotNull(message = "状态不能为空")
    @TableField("state")
    private Integer state;
}
